
#include "stdafx.h"

//#include "vld.h"

#include "BaseApp.h"
#include "IntroView.h"
#include "RtView.h"
#include "ViewManager.h"

#include "Profiler.h"
#include "Ray.h"

using namespace rt;

class TestApp : public mcore::BaseApp
{
public:
	TestApp(HINSTANCE hInstance)
		: BaseApp(hInstance)
	{

	}

	virtual ~TestApp(){}

	virtual void userInit()
	{
		
		//mCore.getViewManager()->setActiveView(new intro::IntroView);
		mCore.getViewManager()->setActiveView(new rt::RtView);
	}
};

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance,
				   PSTR cmdLine, int showCmd)
{
//#if defined(DEBUG) | defined(_DEBUG)
//	_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
//#endif
	//speedTest2();

	int result;
	{
		TestApp app(hInstance);
		app.init();
		result = app.run();
	}

	//_CrtDumpMemoryLeaks();
	
	return result;
}
